#ifndef __TF1J_H__
#define __TF1J_H__
#include <TF1.h>

//! \todo test
class TF1J : public TF1 {
    double ***fIntegral_cache;//!
    double ***r1_cache;//!
    
    Double_t *fAlpha;//!
    Double_t *fBeta;//!
    Double_t *fGamma;//!
    
    Double_t x0,r1,r2,r3;
    double *fIntegral;//!
    double **total_cache;//!
    double qs;
    int qs_j, type_j, i;
    int mod_fact, lower;
    double micro_bin_edge;
public:
    TF1J();
    TF1J(const char *name,Double_t (*fcn)(Double_t *, Double_t *), Double_t xmin, Double_t xmax, Int_t npar);
    ~TF1J();
    using TF1::GetRandom;
    virtual Double_t GetRandom(Double_t xmin, Double_t xmax);
    
    ClassDef(TF1J, 1)
};

#endif